#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void* mypthread_start(void* arg)
{
    while(1){
        sleep(1);
        printf("i am work_thread!\n");
    }

}

int main(int argc, char* argv[])
{
    pthread_t tid;

    int ret = pthread_create(&tid, NULL, mypthread_start, NULL);

    if(ret < 0){ //创建失败
        perror("pthread_create \n");
        return 1;
    }

    while(1){
        sleep(1);
    }
    
    return 0;
}
